package apiday02;

public class RegDemo04 {
    public static void main(String[] args) {
        /**
         * 测试：网站密码是单词字符，最少8个，多了不限：\w{8}
         */
        String reg = "\\w{0,9}";
        String rule = "Hello\\s{1,99}World";

        String s1 = "asdfghjkl";
        String s2 = "asdfghljkl";
        String s3 = "asdfghlljkl";
        String s4 = "asdfgh";
        String s5 = "as";
        String s6 = "Hello                     World";
        System.out.println(s1.matches(reg));
        System.out.println(s2.matches(reg));
        System.out.println(s3.matches(reg));
        System.out.println(s4.matches(reg));
        System.out.println(s5.matches(reg));
        System.out.println(s6.matches(rule));
    }

}
